www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminModelComponentLabel\D_admin_custom_label.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>





<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->
<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->

<!--#include file=../../inc/functionFiless.asp-->



<!--#include file=../../inc/ND_class_function.asp-->





<%


if find_dataw("qitashezhi123","0",7)<>"1" and qx_if_max=0 then
response.redirect "../D_suodinguser.asp"
end if

%>


<script language=javascript>


function show_add_compen(){

AJAXfade(0,'l_list');
AJAXfade(0,'l_do');
AJAXfade(0,'l_path');

AJAXfade(0,'newssss');
AJAXfade(1,'adddssss');

document.bgColor ="#eeeeee";



}





function show_add_q_label(){

AJAXfade(0,'l_list');
AJAXfade(0,'l_do');
AJAXfade(0,'l_path');
AJAXfade(0,'adddssss');
AJAXfade(1,'newssss');
document.bgColor ="#eeeeee";



}


function closen(){

AJAXfade(1,'l_list');
AJAXfade(1,'l_do');
AJAXfade(1,'l_path');
AJAXfade(0,'adddssss');
AJAXfade(0,'newssss');
document.bgColor ="#ffffff";


}

function show_new1_window(){





self.location="D_add_custom_content_loop_lable.asp?fpath=<%=request("fpath")%>&p_page=<%=request("page")%>";



}



function show_new3_window(){





self.location="D_add_custom_dyn_content_lable.asp?fpath=<%=request("fpath")%>&p_page=<%=request("page")%>";



}



function show_new2_window(){





self.location="D_add_custom_c_asp_lable.asp?edittype=1&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>";




}


function closen2(){




AJAXfade(1,'l_list');
AJAXfade(1,'l_do');
AJAXfade(1,'l_path');

AJAXfade(0,'newssss');
AJAXfade(0,'newssss2');

AJAXfade(0,'adddssss');

document.bgColor ="#ffffff";



}

function del_conf(){

if (confirm("确认删除?")==1){

self.location="D_del_custom_folder.asp?fpath=<%=request("fpath")%>&p_page=<%=request("page")%>";



}
}

</script>

























<!------------------------------------------------div:new------------------------>
<style type="text/css">
<!--
.STYLE1 {
	color: #0000FF;
	font-weight: bold;
}
.STYLE2 {
	color: #FF0000;
	font-weight: bold;
}
-->
</style>
<div  id="adddssss" style="filter:blendTrans(duration=1);left:1px;top:1px; visibility:hidden;display:none;width:700px; z-index:2; border: 1px dashed #999999; float:left">
<form action="D_chk_add_admin_ascx.asp" method="post" target="_self" onsubmit="return chkaddascx();">



<input name="fpath" type="hidden" value="<%=request("fpath")%>" />

<input name="page" type="hidden" value="<%=request("page")%>" />


<table width="700" height="307"  border="1" cellpadding="0" cellspacing="0" bgcolor="#cccccc" bordercolor="#333333">


<tr><td height="20" width=650 background="../images/titbg.gif" bordercolor="#333333">
新建后台控件
</td><td height="20" background="../images/titbg.gif" bordercolor="#333333">
<a href=# onclick="closen();">关闭</a>
</td></tr>

<tr>


<td colspan=2>



<br />
&nbsp;将新建的后台控件的控件名(可以填写中文,填后将不能修改): <input type="text" value="" name="namefd" id="namefd"/ size="25">(<span class="STYLE2">如 XXXXX控件</span>)<br />
<br />
&nbsp;后台控件的控件标签的各子标签的标签名主前缀: <input type="text" value="" name="namelb" id="namelb"   size="40" onkeyup="updatena1()" onchange="updatena1()"/><br />

&nbsp;后台控件在后台添加页里添加态子标签的子标签名:<font color="#0000FF">{$$<span id="namee1"></span>$addmode$}</font>
<br />

&nbsp;后台控件在后台修改页里修改态子标签的子标签名:<font color="#0000FF">{$$<span id="namee2"></span>$editmode$}</font>
<br />
&nbsp;后台控件在后台内容列表页里列表显示态子标签的子标签名:<font color="#0000FF">{$$<span id="namee3"></span>$showmode$}</font>
<br />

&nbsp;后台控件在后台添加页的处理页里的添加页处理态子标签的子标签名:<font color="#0000FF">{$$<span id="namee4"></span>$doaddmode$}</font>
<br />

&nbsp;后台控件在后台修改页的处理页里的修改页处理态子标签的子标签名:<font color="#0000FF">{$$<span id="namee5"></span>$doeditmode$}</font>
<br />
<br />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="新  建" /></td>
</tr>





</table>
</form>


<script language="javascript">
function updatena1(){
var a1=document.getElementById("namelb").value;

document.getElementById("namee1").innerHTML=a1;
document.getElementById("namee2").innerHTML=a1;
document.getElementById("namee3").innerHTML=a1;
document.getElementById("namee4").innerHTML=a1;
document.getElementById("namee5").innerHTML=a1;

}

function chkaddascx(){

if (document.getElementById("namefd").value==""){
alert("请填写 \"将新建的后台控件的控件名(可以填写中文)\"");
return false;
}

if (document.getElementById("namelb").value==""){
alert("请填写 \"后台控件的控件标签的各子标签的标签名主前缀\"");
return false;

}

var a2=document.getElementById("namefd").value;

var patt1 = /^([^\/\\\$\#\?\&\.\(\)\{\}\<\>\,\*\@\!\|\+\-\[\]\'\"\;]{1,})$/ig;

var a = patt1.test(a2);

if(a==false){

alert("将新建的后台控件的控件名 不能含\/ \\ ? # & . ( ) { } < > * @ ! ' \" ; | + - [ ]等字符");
return false;
}
a2=document.getElementById("namelb").value;

patt1 = /^([a-zA-Z0-9_]{1,})$/ig;

a = patt1.test(a2);

if(a==false){

alert("后台控件的控件标签的各子标签的标签名主前缀 必须为26个英文字母和数字及_号的组合,不能含其他字符");
return false;
}



return true;



}



updatena1();
</script>

</div>
<!----------------------------end------div:new------------------------>
















<!------------------------------------------------div:new------------------------>



<div  id="newssss" style="filter:blendTrans(duration=1);left:1px;top:1px; visibility:hidden;display:none;width:200px; z-index:2; border: 1px dashed #999999;">


<table width="500" height="307"  border="1" cellpadding="0" cellspacing="0" bgcolor="#cccccc" bordercolor="#333333">


<tr><td height="20" width=450 background="../images/titbg.gif" bordercolor="#333333">
新建非控件标签的自定义公用标签或后台管理页标签
</td><td height="20" background="../images/titbg.gif" bordercolor="#333333">
<a href=# onclick="closen();">关闭</a>
</td></tr>

<tr><td colspan=3>

<span class="STYLE1">新建非控件标签的自定义公用标签或后台管理页标签 ,请选择标签类型:</span><br />
<br />

&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;

<a href=# onclick="show_new1_window();">点击本处新建 内容循环 标签</a><br><br>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;



<a href=# onclick="show_new3_window();">点击本处新建 动态内容 标签</a><br><br>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;

<a href=# onclick="show_new2_window();">点击本处新建 可带asp代码 的标签</a>





</td></tr>





</table>


</div>
<!----------------------------end------div:new------------------------>














<!------------------------------------------------div:new2 mode_select------------------------>



<div  id="newssss2" style="filter:blendTrans(duration=1);left:1px;top:1px; visibility:hidden;display:none;width:200px; z-index:2; border: 1px dashed #999999;">


<table width="500" height="307"  border="1" cellpadding="0" cellspacing="0" bgcolor="#cccccc" bordercolor="#333333">


<tr><td height="20" width=450 background="../images/titbg.gif" bordercolor="#333333">
选择编辑模式 
</td><td height="20" background="../images/titbg.gif" bordercolor="#333333">
<a href=# onclick="closen2();">关闭</a>
</td></tr>

<tr><td colspan=3>

<!--

&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;

<a href="D_add_custom_c_asp_lable.asp?edittype=0&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>">进入代码视图编辑模式(可能乱码)</a><br><br-->
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;

<a href="D_add_custom_c_asp_lable.asp?edittype=1&fpath=<%=request("fpath")%>&p_page=<%=request("page")%>">进入可视化编辑模式</a>





</td></tr>





</table>


</div>
<!----------------------------end------div:new2  mode_select------------------------>







<%


sssp=request("fpath")

if sssp<>"" then
sssspq=split(sssp,"/")

ooosss=""

sssr=ubound(sssspq)-1


dddds=sssspq(sssr)
end if

%>




<div  id="l_do" style="filter:blendTrans(duration=1);  width:734px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 20px; height: 40px;">


<table width=730 >

<tr>

<td>
<span id=dellll>

<input type="button" onclick="del_conf()" value="删除父文件夹(即 <%=dddds%>)" />
</span>


<span id=xxllll>

<input type="button" onclick="javascript:self.location='D_edit_custom_folder_name.asp?fpath=<%=request("fpath")%>&p_page=<%=request("page")%>';" value="修改父文件夹(即 <%=dddds%>)的名称" />
</span>
<br>






<span id=newf>
<input type="button" onclick="javascript:self.location='D_add_custom_folder.asp?fpath=<%=request("fpath")%>&p_page=<%=request("page")%>';" value="添加文件夹" />


</span>




<span id=ccc>

<input type="button" onclick="javascript:self.location='D_copy_custom_folder.asp?fpath=<%=request("fpath")%>&p_page=<%=request("page")%>';" value="复制父文件夹(即 <%=dddds%>)及其子文件夹" />
</span>


<br>





<span id=newlb>

<input type="button" onclick="show_add_compen();" value="添加自定义后台控件" />

<br />

<input type="button" onclick="show_add_q_label();" value="添加非控件标签的自定义公用标签 或 自定义后台管理页的标签" />

<br />

<input type="button" onclick="aaax.submit();" value="查看 在控件标签里 或 在自定义后台管理页里 引用各系统变量所用的特殊标签" />


</span>



<br /><br />






</td>

</tr>


</table>

<%
if request("fpath")="" then
%>

<script language="javascript">

dellll.style.display="none";
xxllll.style.display="none";
ccc.style.display="none";
</script>


<%
else
%>
<script language="javascript">

dellll.style.display="inline";
xxllll.style.display="inline";
ccc.style.display="inline";
</script>



<%


end if



%>







</div>

<br /><br />









<div  id="l_path" style="filter:blendTrans(duration=1);  width:734px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 120px; height: 30px;">


<table width=730 >

<tr>

<td>

当前路径:/Model/ComponentLabels/<%=request("fpath")%>

</td>

</tr>


</table>




</div>






<br /><br />









<div  id="l_list" style="filter:blendTrans(duration=1);  width:774px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 120px; height: 121px;width:730px">




<table  height="107" width=730 border="0" cellpadding="0" cellspacing="0" bordercolor="#999999">




<%
set filea=new Cls_FSO
set fileb=new DosAsp 

if filea.ReportFolderStatus(server.mappath("../../Model/ComponentLabels/"))=1 then



call list_cst_label()


else


%>
<script language="javascript">


alert("/Model/ComponentLabels/目录不存在,即将创建");

</script>



<%

call createfile("../../Model/ComponentLabels/test.asp","1111",true)



call deletefile("../../Model/ComponentLabels/test.asp")



call list_cst_label()



end  if 






nofolder=0
nofiles=0

function list_cst_label()






ss3=filea.ShowFolderList(server.mappath("../../Model/ComponentLabels/"&request("fpath")))

ss4=filea.ShowFileList(server.mappath("../../Model/ComponentLabels/"&request("fpath")))






if ss3=-1 or ss3="" then

nofolder=1

else

ss3=left(ss3,len(ss3)-1)'去掉最后一个|号



'处理文件夹

fl1=split(ss3,"|")


numf1=ubound(fl1)+1


end if

if ss4=-1 or ss4="" then

nofiles=1

else
ss4=left(ss4,len(ss4)-1) '去掉最后一个|号



'处理文件

fl2=split(ss4,"|")


numf2=ubound(fl2)+1


end if







'response.write numf1+numf2


redim flst(numf1+numf2,2)

for i=0 to numf1-1

flst(i,0)=fl1(i)
flst(i,1)=0 '=0表示文件夹


next

for i=numf1 to numf1+numf2-1

ii=i-numf1

flst(i,0)=fl2(ii)
flst(i,1)=1 '=1表示文件


next

yy=4
xx=8


per_p=xx*yy






if request("page")="" then
npage=1
else
npage=cint(request("page"))
end if

ptr=0



for iip=1 to npage-1


ptr=ptr+per_p

next




%>




<tr width=730 align=left height=60>
<td>
<%
sssp=request("fpath")
sssspq=split(sssp,"/")

ooosss=""

for iii=0 to ubound(sssspq)-2

ooosss=ooosss&sssspq(iii)&"/"



next



%>



<a href="D_admin_custom_label.asp?fpath=<%=ooosss%>">
<img src="../IMG/Folder/folder.gif" border=0>(返回上一级目录)

</a>



</td>

</tr>




<script language="javascript">

function iconf(a){

if (confirm("确认删除?")==1){

self.location=a;
}


}




</script>


<%



for ix=1 to xx
if (ptr-(npage-1)*per_p)>(per_p-1) or ptr>numf1+numf2-1 then exit for
%>

<tr width=730 align=center>


<%

for iy=1 to yy
if (ptr-(npage-1)*per_p)>(per_p-1)  or ptr>numf1+numf2-1 then exit for

%>









<%


if request("fpath")="" then

fph=replace(flst(ptr,0),"&","----")&"/"

else
sssd="/"
if instr(request("fpath"),"/")<>0 then sssd=""

fph=request("fpath")&sssd&replace(flst(ptr,0),"&","----")&"/"

end if

sssa1=""
sssaab1=""
if flst(ptr,1)=0 then




'--------------------1

if filea.ReportFileStatus(server.mappath("../../Model/ComponentLabels/"&fph&"index_componentlabel.asp"))=1 then


sss1=loadfile("../../Model/ComponentLabels/"&fph&"index_componentlabel.asp")

if instr(1,sss1,"$componentlabelname:",1)<>0 then
nd1_m_label_name=trim(mid(sss1,instr(1,sss1,"$componentlabelname:",1)+20,instr(1,sss1,"$end_componentlabelname",1)-(instr(1,sss1,"$componentlabelname:",1)+20)))
else
nd1_m_label_name=""
end if


if instr(1,sss1,"$is_sys_componentlabel:",1)<>0 then
nd1_m_label_is_sys=trim(mid(sss1,instr(1,sss1,"$is_sys_componentlabel:",1)+23,instr(1,sss1,"$end_is_sys_componentlabel",1)-(instr(1,sss1,"$is_sys_componentlabel:",1)+23)))
else
nd1_m_label_is_sys=""
end if

if nd1_m_label_is_sys="1" then
sssa1="(系统控件)"
else
sssa1="(自定义控件)"
end if

sss2=flst(ptr,0)
sss22="<a href='D_admin_a_ascx.asp?fpath="&fph&"'>"
sss33="<a href='D_admin_a_ascx.asp?fpath="&fph&"'><font color=#0000ff>编辑控件</font></a>"
sss44="<a href='javascript:void(0)' onclick=""iconf('"&"D_del_a_ascx.asp?fpath="&fph&"')""><font color=#0000ff>删除控件</font></a>"

sssaab1="<a href='D_copy_ascx.asp?fpath="&fph&"&p_page="&request("page")&"'><font color=#0000ff>复制控件</font></a><br><br><a href='D_view_ascx_labels_cang.asp?fpath="&fph&"'><font color=#0000ff>查看此控件各标签的标签名及参数</font></a>"

else
sss2="<a href='D_admin_custom_label.asp?fpath="&fph&"'>"&flst(ptr,0)&"</a>"
sss22="<a href='D_admin_custom_label.asp?fpath="&fph&"'>"
sss33=""
sss44=""
sssaab1=""

end if

'----------------------1

%>


<td width=50  align=center>


<table border=0 bordercolor=#cccccc >

<tr>

<td>

<table  width=160 style="word-break:break-all" border=1 bordercolor=#bbbbc8>


<tr>

<td valign="top">



<%
'--------------------1

if filea.ReportFileStatus(server.mappath("../../Model/ComponentLabels/"&fph&"index_componentlabel.asp"))=1 then

%>
<%=sss22%>
<img src="../IMG/ascx.jpg" border=0 width=45>
</a>
<%
else
%>
<%=sss22%>
<img src="../IMG/Folder/folder.gif" border=0  width=40>
</a>

<%
end if

'----------------------1

%>

</td>

<td width=110  style="word-break:break-all" colspan="1">
<%=sss33%><br /><%=sssaab1%><br /><br />
<%=sss44%>
</td>

</tr>



<tr>

<td width=150  style="word-break:break-all" colspan="2">
<strong><font color="#cc0055"><%=sss2%></font></strong><br /><%=sssa1%>


</td>

</tr>

<tr>

<td width=160  style="word-break:break-all" colspan="2">
<%
'--------------------2

if filea.ReportFileStatus(server.mappath("../../Model/ComponentLabels/"&fph&"index_componentlabel.asp"))=1 then

%>
控件各标签的标签名主前缀:{$$<%=nd1_m_label_name%>

<%
end if

'----------------------2

%>
</td>

</tr>







</table>
</td>

</tr>

</table>



</td>












<%


else



ss4=fph
ss4=left(ss4,len(ss4)-1)

dddd=loadfile("../../Model/ComponentLabels/"&ss4)


call get_info_array_from_label_file_content(dddd)




sss2="<a href='D_edit_custom_label.asp?fname="&fph&"'>"&flst(ptr,0)&"( {$$"&nd1_l_name&"})</a>"

sss22="<a href='D_edit_custom_label.asp?fname="&fph&"'>"


%>








<td width=50  align=center>


<table width="171" border=1 bordercolor=#cccccc >

<tr>

<td width="182">

<table  width=156 style="word-break:break-all">


<tr>

<td width="51">



<%
'--------------------1

%>
<img src="../IMG/Label/label3.gif" border=0 width=45>
</a>


<%

'----------------------1

%>

</td>

<td width=119  style="word-break:break-all" colspan="1">

<%if flst(ptr,1)=1 then%>
&nbsp;<a href="D_copy_custom_label.asp?fname=<%=fph%>"><font color="#0000FF">复制此标签</font></a>
<br />
&nbsp;<a href="D_edit_custom_label.asp?fname=<%=fph%>"><font color="#0000FF">编辑</font></a>


<%end if%>



</td>

</tr>



<tr>

<td  style="word-break:break-all" colspan="2">
<%=sss2%><br />(公用标签)


</a>
</td>

</tr>

<tr>

<td  style="word-break:break-all" colspan="2">
<%=left(nd1_label_beizhu,400)%>




</a>
</td>

</tr>







</table>
</td>

</tr>

</table>



</td>



















<%
end if

%>






<%
ptr=ptr+1

next

%>

</tr>

<%
next

if nofiles=1 and nofolder=1 then
%>


<tr width=730 align=center><td>
此文件夹内无内容
</td>
</tr>


<%end if%>

<tr width=730  align="center"><td align="center" colspan=8>


<%
zong_p=cint((numf1+numf2)/per_p)
if ((numf1+numf2) mod per_p)>0 then

zong_p=zong_p+1

end if




if npage<zong_p then

www3="<a href='D_admin_custom_label.asp?page="&npage+1&"&fpath="&request("fpath")&"'>下一页</a>"

end if

if npage>1 then

www2="<a href='D_admin_custom_label.asp?page="&npage-1&"&fpath="&request("fpath")&"'>上一页</a>"

end if

if npage>=1 then

www1="<a href='D_admin_custom_label.asp?page="&"1"&"&fpath="&request("fpath")&"'>首页</a>"

end if


if npage<=zong_p then

www4="<a href='D_admin_custom_label.asp?page="&zong_p&"&fpath="&request("fpath")&"'>末页</a>"

end if


swww="&nbsp;&nbsp;&nbsp;"&www1&"&nbsp;&nbsp;&nbsp;"&www2&"&nbsp;&nbsp;&nbsp;"&www3&"&nbsp;&nbsp;&nbsp;"&www4&"&nbsp;&nbsp;&nbsp;"&npage&"/"&zong_p&"页"

%>

<%

=swww

%>



</td></tr>






<%
end function

%>






<table>



</div>





<form name="aaax" id="aaax" action="../adminModel/D_view_sys_cang_labels.asp" target=_blank>


</form>






<script language=javascript>
AJAXfade(1,'l_list')
AJAXfade(1,'l_do')
AJAXfade(1,'l_path')
</script>